<!-- 继承form.html模板 -->
{% extends "public/form.html" %}
{% block content %}
    <form class="layui-form model-form" action="" style="width: 80%;">
        <input name="id" id="id" type="hidden" value="{{data.id|default(0)}}">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">通知标题：</label>
                <div class="layui-input-inline">
                    <input name="title" value="{{data.title}}" lay-verify="required" autocomplete="off" placeholder="请输入通知标题" class="layui-input" type="text">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">通知来源：</label>
                <div class="layui-input-inline">
                    {{ "source|1|通知来源|name|id"|select(sourceList, data.source) }}
                </div>
            </div>
        </div>
         <div class="layui-form-item">

        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">外部链接：</label>
                <div class="layui-input-inline">
                    <input name="url" value="{{data.url}}" lay-verify="required" autocomplete="off" placeholder="请输入外部链接" class="layui-input" type="text">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">点击率：</label>
                <div class="layui-input-inline">
                    <input name="click" value="{{data.click}}" lay-verify="required|number" autocomplete="off" placeholder="请输入点击率" class="layui-input" type="text">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">是否置顶：</label>
                <div class="layui-input-inline">
                    {{ "is_top"|switch("已置顶|未置顶", data.is_top|default(1)) }}
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">通知状态：</label>
                <div class="layui-input-inline">
                    {{ "status"|switch("已发布|未发布", data.status|default(1)) }}
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">通知内容：</label>
            <div class="layui-input-block">
                <textarea name="content" id="content" lay-verify="required" class="layui-textarea">{{data.content}}</textarea>
                {{ "content"|editor("default", "80%", 450) }}
            </div>
        </div>
        {{ "submit|立即保存,close|关闭"|submit(1, "") }}
    </form>
{% endblock %}